vcSwitchCaseStatement
A vcSwitchCaseStatement executes the first vcCaseScope for which the value of its CaseCondition property matches that of statement's Condition property.
See in: Overview
Module: vcRobotics
Parent: vcStatement
Children -
Referenced by: -
Properties
Learn how to use properties here. The properties are also inherited from the parent class.
| Name | Type | Access | Description |
| Cases | vcList | R | Gets expression that defines the value against which the case conditions are evaluated. |
| Condition | String | RW | Gets expression that defines the value against which the case conditions are evaluated. |
Methods
Learn how to use methods here. The methods are also inherited from the parent class.
| Name | Return Type | Parameters | Description |
| addCase | vcCaseScope | None | Creates a new empty vcCaseScope to the end of the Cases list. Returns: vcCaseScope: Created case scope. |
| deleteCase | None | vcCaseScope caseScope | Removes an existing case from the statement Cases list and deletes it. Parameters: caseScope (vcCaseScope): Case scope to delete. |
| insertCase | vcCaseScope | Integer index | Creates a new empty vcCaseScope and inserts it to the given index.See moreIf index is less than zero or greater than the current case count, the case will be appended to the end. Parameters: index (int): Index to insert into. Returns: vcCaseScope: Created case scope. |
| insertCase | vcCaseScope | Integer index, vcCaseScope caseScope | Inserts given caseScope to the Cases list at the given index. If index is less than zero or greater than the current case count, the case will be appended to the end. See moreParameters: index (int): Index to insert into. caseScope (vcCaseScope): Case scope to insert. Returns: vcCaseScope: Inserted case scope. |
| moveCase | None | vcCaseScope caseScope, Integer newIndex | Moves an existing case to the new position in the Cases list. If the given index is less than zero or greater than the current case count, the case will be moved to the end. See moreParameters: caseScope (vcCaseScope): Case scope to move. newIndex (int): Index to move to. |
| releaseCase | None | vcCaseScope caseScope | Removes an existing case from the statement Cases list, but does not delete given vcCaseScope object. Parameters: caseScope (vcCaseScope): Case scope to remove. |
Events
Learn how to use events here. The events are also inherited from the parent class.
| Name | Parameters | Description |
| OnCaseAdded | None | Event that occurs when a case has been added.See moreArguments: caseScope (vcCaseScope): Added case scope. index (int): Index where case scope was added. |
| OnCaseMoved | None | Event that occurs when a case has been moved to a new index.See moreArguments: caseScope (vcCaseScope): Moved case scope. oldIndex (int): Old index of the case scope. newIndex (int): New index of the case scope. |
| OnCaseRemoved | None | Event that occurs when a case has been removed.See moreArguments: caseScope (vcCaseScope): Removed case scope. index (int): Index of the removed case scope. |